import request from '@/utils/request'
import { getServicePath } from '@/api/baseUrlConfig'
const servicePath = getServicePath()
// servicePath.dpMamtServer +
export function getList (params) {
  return request({
    url: servicePath.userServer + '/resources/getList',
    method: 'get',
    params
  })
}
export function addOrUpd (data) {
  return request({
    url: servicePath.userServer + '/resources/addOrUpd',
    headers: {
      showLoading: true
    },
    method: 'post',
    data
  })
}
// 删除菜单
export function deleted (params) {
  return request({
    url: servicePath.userServer + '/resources/deleted',
    headers: {
      showLoading: true
    },
    method: 'get',
    params
  })
}
// 查询上级目录
export function getParentList (params) {
  return request({
    url: servicePath.userServer + '/resources/getParentList',
    method: 'get',
    params
  })
}
// 查询系统所有资源
export function getAllService (params) {
  return request({
    url: servicePath.userServer + '/resources/getAllService',
    method: 'get',
    params
  })
}
